const isNullOrEmpty = function(val) {
    if (val == null || val == "" || typeof(val) == undefined) {
        return true;
    } else {
        return false;
    }
}
// 保留两位小数
const toFixed = function(x) {
	return parseFloat(x).toFixed(2);
}

// 图片的路径进行统一的处理
const formatUrl = function(url) {
	return url.indexOf('http') !== -1 ? url : 'http://106.13.76.109:8080/xsmall/sys/common/view/'+ url
}

export default {
	isNullOrEmpty,
	toFixed,
	formatUrl
}